perm filename XFORMS[FOO,LMM] blob sn#092635 filedate 1974-03-17 generic text, type T, neo UTF8
(FILECREATED "16-MAR-74  5:12:38" XFORMS.LISP/360)


(DEFINEQ

(@1
  (LAMBDA (X M)
    (COND
      ((OR (NULL X)
           (NUMBERP X)
           (STRINGP X)
           (EQ X T))
        X)
      ((SETQ M (@2 X M))
        M)
      (T (LIST (QUOTE QUOTE)
               X)))))

(@2
  (LAMBDA (X N)
    (COND
      ((ATOM X)
        NIL)
      ((EQ (CAR X)
           (QUOTE ≠))
        (COND
          ((ATOM (CDR X))
            (CDR X))
          ((NULL (CDDR X))
            (LIST (QUOTE LIST)
                  (CADR X)))
          (T ((LAMBDA (D E)
                 (COND
                   ((EQ (CAR D)
                        (QUOTE LIST))
                     (CONS (QUOTE LIST)
                           (CONS E (CDR D))))
                   (T (LIST (QUOTE CONS)
                            E D))))
               (@1 (CDDR X))
               (CADR X)))))
      ((NULL (CDR X))
        (COND
          ((SETQ N (@2 (CAR X)
                       N))
            (LIST (QUOTE LIST)
                  N))
          (T NIL)))
      (T (PROG (M)
               (SETQ M (@2 (CAR X)
                           N))
               (SETQ N (@2 (CDR X)
                           N))
               (COND
                 ((AND (NULL M)
                       (NULL N))
                   (RETURN NIL)))
               (COND
                 ((AND (NULL M)
                       (SETQ M (CAR X))
                       (NOT (NUMBERP M))
                       (NOT (EQ M T))
                       (NOT (STRINGP M)))
                   (SETQ M (LIST (QUOTE QUOTE)
                                 M))))
               (RETURN (COND
                         ((EQ (CAR N)
                              (QUOTE LIST))
                           (CONS (CAR N)
                                 (CONS M (CDR N))))
                         (T (LIST (QUOTE CONS)
                                  M
                                  (COND
                                    ((AND (NULL N)
                                          (SETQ N (CDR X))
                                          (NOT (NUMBERP N))
                                          (NOT (EQ N T)))
                                      (LIST (QUOTE QUOTE)
                                            N))
                                    (T N)))))))))))

(INTEXP
  (LAMBDA (Z)
    (OR INTEGERFLAG (FIXP Z)
        (FMEMB (VALUETYPE Z)
               (QUOTE (S I))))))

(VALUECONTEXT
  (LAMBDA (TYPE)

          (* RETURNS NIL IF THE VALUE OF THE CURRENT 
          EXPRESSION (##) IS NOT USED , OR IF TYPE ISN'T NIL 
          AND THE VALUE OF THE EXPRESSION IS USED ONLY FOR A 
          PREDICATE)


    (PROG ((CUREXP (##))
           (PARENT (## !0))
           (TWOPARENT (## !0 !0))
           (TAIL (## UP)))
          (RETURN (NOT (SELECTQ (CAR PARENT)
                                ((PROG PROGN)
                                  (CDR TAIL))
                                (PROG1 (NEQ TAIL (CDR PARENT)))
                                ((AND OR)
                                  (IF (CDR TAIL)
                                      THEN TYPE
                                    ELSE (GO RECUR)))
                                (LAMBDA NIL)
                                ((NOT NULL)
                                  TYPE)
                                (COND
                                  ((EQ (CAR TWOPARENT)
                                       (QUOTE COND))
                                    (OR (AND (CDR TAIL)
                                             (COND
                                               ((EQ TAIL PARENT)
                                                 TYPE)
                                               (T T)))
                                        (GO TWORECUR)))
                                  (T (HELP))))))
      TWORECUR
          (RETURN (PROG (FLG)
                        (## !0 !0 (E (SETQ FLG (VALUECONTEXT TYPE))
                                     T))
                        (RETURN FLG)))
      RECUR
          (RETURN (PROG (FLG)
                        (## !0 (E (SETQ FLG (VALUECONTEXT TYPE))
                                  T))
                        (RETURN FLG))))))

(SMALLEXP
  (LAMBDA (X)
    (OR (SMALLP X)
        SMALLINTEGERFLAG
        (EQ (VALUETYPE X)
            (QUOTE S)))))

(NUMBEREXP
  (LAMBDA (X)
    (OR (NUMBERP X)
        (FMEMB (VALUETYPE X)
               (QUOTE (S I F N))))))

(ATOMEXPRESSION
  (LAMBDA (X)
    (AND (EQ (CAR X)
             (QUOTE QUOTE))
         (NLISTP (CADR X)))))
)
  (LISPXPRINT (QUOTE XFORMSFNS)
              T)
  (RPAQQ XFORMSFNS (@1 @2 INTEXP VALUECONTEXT SMALLEXP NUMBEREXP 
                       ATOMEXPRESSION))
  (LISPXPRINT (QUOTE XFORMSVARS)
              T)
  (RPAQQ XFORMSVARS
         ((FNS @1 @2 INTEXP SMALLEXP NUMBEREXP ATOMEXP VALUECONTEXT 
               TORNIL VALUETYPE)
          (PROP VALUETYPE * VALUETYPELST)
          (VARS (#RPARS))
          (TRANSAVE)
          (USERMACROS LAZY REM REMFIX NO EXPANDMACS)
          (P (OR (GETD (QUOTE TRANSOR))
                 (LOAD (OR (INFILEP (QUOTE <NEWLISP>TRANSOR.COM))
                           (INFILEP (QUOTE <LISP>TRANSOR.COM))))))
          (ADVISE UREAD TRANSOR HELP-IN-TRANSITBLOCK)))
(DEFINEQ

(@1
  (LAMBDA (X M)
    (COND
      ((OR (NULL X)
           (NUMBERP X)
           (STRINGP X)
           (EQ X T))
        X)
      ((SETQ M (@2 X M))
        M)
      (T (LIST (QUOTE QUOTE)
               X)))))

(@2
  (LAMBDA (X N)
    (COND
      ((ATOM X)
        NIL)
      ((EQ (CAR X)
           (QUOTE ≠))
        (COND
          ((ATOM (CDR X))
            (CDR X))
          ((NULL (CDDR X))
            (LIST (QUOTE LIST)
                  (CADR X)))
          (T ((LAMBDA (D E)
                 (COND
                   ((EQ (CAR D)
                        (QUOTE LIST))
                     (CONS (QUOTE LIST)
                           (CONS E (CDR D))))
                   (T (LIST (QUOTE CONS)
                            E D))))
               (@1 (CDDR X))
               (CADR X)))))
      ((NULL (CDR X))
        (COND
          ((SETQ N (@2 (CAR X)
                       N))
            (LIST (QUOTE LIST)
                  N))
          (T NIL)))
      (T (PROG (M)
               (SETQ M (@2 (CAR X)
                           N))
               (SETQ N (@2 (CDR X)
                           N))
               (COND
                 ((AND (NULL M)
                       (NULL N))
                   (RETURN NIL)))
               (COND
                 ((AND (NULL M)
                       (SETQ M (CAR X))
                       (NOT (NUMBERP M))
                       (NOT (EQ M T))
                       (NOT (STRINGP M)))
                   (SETQ M (LIST (QUOTE QUOTE)
                                 M))))
               (RETURN (COND
                         ((EQ (CAR N)
                              (QUOTE LIST))
                           (CONS (CAR N)
                                 (CONS M (CDR N))))
                         (T (LIST (QUOTE CONS)
                                  M
                                  (COND
                                    ((AND (NULL N)
                                          (SETQ N (CDR X))
                                          (NOT (NUMBERP N))
                                          (NOT (EQ N T)))
                                      (LIST (QUOTE QUOTE)
                                            N))
                                    (T N)))))))))))

(INTEXP
  (LAMBDA (Z)
    (OR INTEGERFLAG (FIXP Z)
        (FMEMB (VALUETYPE Z)
               (QUOTE (S I))))))

(SMALLEXP
  (LAMBDA (X)
    (OR (SMALLP X)
        SMALLINTEGERFLAG
        (EQ (VALUETYPE X)
            (QUOTE S)))))

(NUMBEREXP
  (LAMBDA (X)
    (OR (NUMBERP X)
        (FMEMB (VALUETYPE X)
               (QUOTE (S I F N))))))

(ATOMEXP
  (LAMBDA (X)                                   (* CAN USE EQ ON THIS ?)
    (COND
      ((EQ (CAR X)
           (QUOTE QUOTE))
        (NLISTP (CADR X)))
      (T (FMEMB (VALUETYPE X)
                (QUOTE (S A T)))))))

(VALUECONTEXT
  (LAMBDA (TYPE)

          (* RETURNS NIL IF THE VALUE OF THE CURRENT 
          EXPRESSION (##) IS NOT USED , OR IF TYPE ISN'T NIL 
          AND THE VALUE OF THE EXPRESSION IS USED ONLY FOR A 
          PREDICATE)


    (PROG ((CUREXP (##))
           (PARENT (## !0))
           (TWOPARENT (## !0 !0))
           (TAIL (## UP)))
          (RETURN (NOT (SELECTQ (CAR PARENT)
                                ((PROG PROGN)
                                  (CDR TAIL))
                                (PROG1 (NEQ TAIL (CDR PARENT)))
                                ((AND OR)
                                  (IF (CDR TAIL)
                                      THEN TYPE
                                    ELSE (GO RECUR)))
                                (LAMBDA NIL)
                                ((NOT NULL)
                                  TYPE)
                                (COND
                                  ((EQ (CAR TWOPARENT)
                                       (QUOTE COND))
                                    (OR (AND (CDR TAIL)
                                             (COND
                                               ((EQ TAIL PARENT)
                                                 TYPE)
                                               (T T)))
                                        (GO TWORECUR)))
                                  (T (HELP))))))
      TWORECUR
          (RETURN (PROG (FLG)
                        (## !0 !0 (E (SETQ FLG (VALUECONTEXT TYPE))
                                     T))
                        (RETURN FLG)))
      RECUR
          (RETURN (PROG (FLG)
                        (## !0 (E (SETQ FLG (VALUECONTEXT TYPE))
                                  T))
                        (RETURN FLG))))))

(TORNIL
  (LAMBDA (X)
    (OR (NULL X)
        (EQ X T)
        (FMEMB (CAR (LISTP X))
               (QUOTE (NOT NULL AND OR ATOM EQ MEMQ MEMBER NUMBERP))))))

(VALUETYPE
  (LAMBDA (X)
    (COND
      ((LISTP X)
        (SETQ X (CAR X)))
      ((MEMB X (CAR FILESPECVARS)))
      (T (SETQ X)))
    (AND
      X
      (OR
        (GETP X (QUOTE VALUETYPE))
        (/PUT X (QUOTE VALUETYPE)
              (PROGN (PRIN1 X T)
                     (PROG1 (Y/N ((U . nknown)
                                  (S . mall% integer)
                                  (I . nteger)
                                  (F . loating-point)
                                  (N . umber)
                                  (A . tom)
                                  (T . /NIL)
                                  (O . ther))
                                 " value type?")
                            (/RPLACA (QUOTE VALUETYPELST)
                                     (CONS X
                                           (LISTP (CAR (QUOTE 
                                                       VALUETYPELST)))))
                            )))))))
)
  (RPAQQ VALUETYPELST
         (IPLUS BONDORDER TIMES MASS TYPE CDAR NAME IMIN DOTS MIN CAAR 
                LENGTH CDR CAR))
(DEFLIST(QUOTE(
  (IPLUS I)
  (BONDORDER S)
  (TIMES N)
  (MASS I)
  (TYPE A)
  (CDAR U)
  (NAME A)
  (IMIN I)
  (DOTS S)
  (MIN N)
  (CAAR U)
  (LENGTH S)
  (CDR U)
  (CAR U)
))(QUOTE VALUETYPE))

  (RPAQ #RPARS)
  (RPAQQ DUMPFILE XFORMS.LISP/360)
  (RPAQQ USERNOTES ((ALIST (* THE ALIST OPTION IN APPLY IS NOT 
                              IMPLEMENTED IN INTERLISP - THIS NEEDS TO 
                              BE RECODED))
          (APPLY/EVAL (* TRANSOR will translate the arguments of the 
                         APPLY or EVAL expression, but the user must 
                         make sure that the run-time evaluation of the 
                         arguments returns a BBN-compatible expression.)
                      )
          (ARRAYS (* Array function. No transformations for these 
                     functions have been composed yet.))
          (BLAMBDA1 (* LISTP CAR-OF-FORM: THERE IS SOMETHING WRONG HERE)
                    )
          (DEBUG: (* This didn't do anything in LISP 1.5!!!!))
          (EXPLODE: (* LISP 1.5 EXPLODE creates all characters
                       (i.e., (EXPLODE (QUOTE A123))
                              will result in a list OF 4 characters)
                       %. Interlisp makes the 1, 2 and 3 into numbers))
          (FEATURE (* This feature is not available in INTERLISP and 
                      must be recoded))
          (FILES (* Io functions differ on the 360 and the pdp-10. Only 
                    a weak attempt has been made to translate the code. 
                    The user needs to examine the code carefully and 
                    make sure that it is doing what is expected))
          (FIXIT (* YOU MUST FIX THIS NOW))
          (GENSYM1: (* GENSYM doesn't take an ARG here))
          (INTERN (* No direct match for INTERN exists on INTERLISP.))
          (LABEL (* The LABEL device is not implemented in INTERLISP.))
          (LAZY (* I did not really expect this fn to appear and will
                   (may)
                   write TRANSFORMATIONS for it if it does.))
          (LOGP: (* No logical numbers in INTERLISP))
          (MACHINE-CODE (* Expression dependent on machine-code. User 
                           must recode.))
          (MIN/MAX (* THE FUNCTIONS MAX AND MIN IS NOT DEFINED IN THE 
                      INTERLISP SYSTEM; YOU NEED TO DEFINE IT YOURSELF.)
                   )
          (MKATOM (* Creating atoms is handled differently - Collect a 
                     list and then call readlist on it, rather than 
                     USING RLIT, RNUMB and MKATOM - This expression 
                     hasn't been changed, but one could work up a 
                     transformation in terms OF some SPECIAL variable 
                     if required))
          (SPEC (* The function SPECIAL must be defined for the program 
                   to work))
          (UDF (* This function is not defined directly in INTERLISP))))
  (RPAQQ NLISTPCOMS NIL)
  (RPAQQ LAMBDACOMS ((IF (NEQ (CAAAR L)
                              (QUOTE LAMBDA))
                         ((REMFIX BLAMBDA1))
                         (MARK (ORR (1 (NTH 3)
                                       DOTHESE)
                                    ((REMFIX BLAMBDA1)))
                               ←←
                               (NTH 2)
                               DOTHESE))))
  (RPAQQ TRANSFORMATIONS (* *AND *MAX *MIN *OR *PLUS *SUBLIS *TIMES 
                            ADD1 AND APPEND1 APPLY APPREV ARRAY ASA 
                            ASSOC ATTRIB BPSCHKPT BPSLEFT BPSMOVE 
                            BPSRESTR BPSUSED BPSWIPE BPSZ BREAKP 
                            CHKPOINT CLEANUP CLOSE COMMENT COMMON 
                            COMPILE COMPRESS COND COUNT CR CSET CSETQ 
                            DEBUG DEFINE DEFINEF DEFLIST DIFFERENCE 
                            DIGP DIVIDE EJECT EQUAL EVAL EVCON EVENP 
                            EVLIS EXCISE EXITERR EXPLODE EXPLODE1 EXPT 
                            FIXB FIXDEFINE FLAG FLAGP FLOATB FOR 
                            FULLWORDP GENSYM1 GENSYM2 GEQ GET GETIME 
                            GREATERP GSET INLL INSERT INTERN LAP360 
                            LEFTSHIFT LENGTHEXPLODE LEQ LESSP LETP LITP 
                            LOGP MACEXP MACFEXP MACRO MACWEISS MAX 
                            MEMBER MEMQ MIN MINUS MKATOM NEQ NUMBERP 
                            OPEN OPTIMIZE OR ORDERP OTLL OVOFF OVON 
                            PAIR PAIRMAP PLANT PLANT1 PLANTDC PLANTSQ 
                            PLUS PRBUFFER PRINC PRINLAP PROG PROG2 
                            PUTPROP QUOTE QUOTIENT RDS READCH RECIP 
                            RELINK REMAINDER REMFLAG REMFLAGS REMOB 
                            REMPROP RESTORE RETIME RLIT RNUMB SASSOC 
                            SET SETQ SORT SPEAK SPECIAL STOREATOM 
                            STORECHAR STOREEVAL STORELIST SUB1 SUBLIS 
                            SUBST15 THOSE TIMES TIMETOT TRACE TTAB 
                            UNCOMMON UNMACRO UNSPECIAL UNTRACE VERBOS 
                            WRS XTAB ZEROP { }))
(DEFLIST(QUOTE(
  (* (LAZY))
  (*AND (LAZY))
  (*MAX (LAZY))
  (*MIN (LAZY))
  (*OR (LAZY))
  (*PLUS (LAZY))
  (*SUBLIS (LAZY))
  (*TIMES (LAZY))
  (ADD1 (2 DOTHIS 0 (IF (INTEXP (## 2))
                        NIL
                        ((1 PLUS 1)))))
  (AND ((IF (AND (VALUECONTEXT T)
                 (NOT (TORNIL (## -1))))
            ((N T))
            NIL)))
  (APPEND1 ((1 NCONC1)))
  (APPLY ((IF (## 4)
              ((REMARK ALIST))
              NIL)))
  (APPREV ((1 NCONC)
           2
           (MBD REVERSE)
           0))
  (ARRAY (LAZY))
  (ASA ((REMFIX FEATURE)))
  (ASSOC ((NTH 2)
          DOTHESE !0 (IF (ATOMEXP (## 2))
                         NIL
                         ((1 SASSOC)))
          (IF (## 4)
              ((IF (EQ (CAR (## 4)
                            (QUOTE LAMBDA)))
                   ((REMFIX FEATURE))
                   NIL)
               (MBD OR)
               (MOVE 2 4 TO N)
               2)
              ((4)))
          (MBD CDR)))
  (ATTRIB ((1 (LAMBDA (X Y)
                      (COND ((LISTP X)
                             (NCONC X Y))
                            (X (RPLACD X (NCONC X Y))))
                      Y))))
  (BPSCHKPT ((REMARK FEATURE)
             (-1 * FEATURE)))
  (BPSLEFT ((REMARK FEATURE)
            (-1 * FEATURE)))
  (BPSMOVE ((REMARK FEATURE)
            (-1 * FEATURE)))
  (BPSRESTR ((REMARK FEATURE)
             (-1 * FEATURE)))
  (BPSUSED ((REMARK FEATURE)
            (-1 * FEATURE)))
  (BPSWIPE ((REMARK FEATURE)
            (-1 * FEATURE)))
  (BPSZ ((REMARK FEATURE)
         (-1 * FEATURE)))
  (BREAKP (LAZY))
  (CHKPOINT (LAZY))
  (CLEANUP (LAZY))
  (CLOSE ((REMARK FILES)
          (1 CLOSEF)))
  (COMMENT ((1 *)
            NLAM))
  (COMMON ((1 SPECIAL)
           DOTHIS))
  (COMPILE ((DELETE)))
  (COMPRESS ((1 PACK)))
  (COND (1 (LPQ NX DOTHESE)))
  (COUNT (LAZY))
  (CR (LAZY))
  (CSET ((1 SET)
         (REMARK COMMON)))
  (CSETQ ((REMARK COMMON)
          (1 SETQ)))
  (DEBUG (LAZY))
  (DEFINE ((IF (EQ (## 2 1)
                   (QUOTE QUOTE))
               ((1 DEFINEQ)
                2
                (XTR 2)
                0
                (BO 2)
                (NTH 2)
                (LPQ MARK 1 2 (IF (NEQ (## 1)
                                       (QUOTE LAMBDA))
                                  LAZY NIL)
                     3 EXPANDMACS DOTHIS ←← (NTH 2)))
               LAZY)))
  (DEFINEF (LAZY))
  (DEFLIST (LAZY))
  (DIFFERENCE (2 UP DOTHESE !0 (IF (AND (INTEXP (## 2))
                                        (INTEXP (## 3)))
                                   ((1 IDIFFERENCE))
                                   NIL)))
  (DIGP (LAZY))
  (DIVIDE (LAZY))
  (EJECT ((: (PRIN1 (QUOTE "")))))
  (EQUAL ((NTH 2)
          DOTHESE !0 (IF (OR (AND (SMALLEXP (## 2))
                                  (SMALLEXP (## 3)))
                             (ATOMEXP (## 2))
                             (ATOMEXP (## 3)))
                         ((1 EQ))
                         ((IF (OR (NUMBEREXP (## 2))
                                  (NUMBEREXP (## 3)))
                              ((1 EQP))
                              NIL)))))
  (EVAL ((REMARK APPLY/EVAL)
         (IF (## 3)
             ((1 EVALA))
             (3))))
  (EVCON (LAZY))
  (EVENP ((1 IREMAINDER)
          (N 2)
          2 DOTHIS 0 (MBD ZEROP)))
  (EVLIS (LAZY))
  (EXCISE (LAZY))
  (EXITERR (LAZY))
  (EXPLODE ((REMARK EXPLODE:)
            (1 UNPACK)))
  (EXPLODE1 ((1 UNPACK)))
  (EXPT NIL)
  (FIXB ((1 FIX)))
  (FIXDEFINE (LAZY))
  (FLAG (LAZY))
  (FLAGP (LAZY))
  (FLOATB ((1 FLOAT)))
  (FOR (LAZY))
  (FULLWORDP (LAZY))
  (GENSYM1 ((REMARK GENSYM1:)
            (1 GENSYM)
            (2)))
  (GENSYM2 (LAZY))
  (GEQ ((1 LESSP)
        (MBD NOT)))
  (GET ((IF (ATOMEXP (## 2))
            ((1 GETP))
            (2 (MBD CDR)))))
  (GETIME ((1 RESULTS)))
  (GREATERP ((NTH 2)
             DOTHESE !0 (IF (AND (INTEXP (## 2))
                                 (INTEXP (## 3)))
                            ((1 IGREATERP))
                            NIL)))
  (GSET ((1 SET)))
  (INLL (REM))
  (INSERT ((REMARK LAZY)))
  (INTERN (LAZY))
  (LAP360 (LAZY))
  (LEFTSHIFT ((1 LSH)))
  (LENGTHEXPLODE ((1 NCHARS)))
  (LEQ ((1 GREATERP)
        (MBD NOT)))
  (LESSP ((NTH 2)
          DOTHESE !0 (IF (AND (INTEXP (## 2))
                              (INTEXP (## 3)))
                         ((1 ILESSP))
                         NIL)))
  (LETP (LAZY))
  (LITP (LAZY))
  (LOGP ((REMARK LOGP:)
         (1 FIXP)))
  (MACEXP (LAZY))
  (MACFEXP (LAZY))
  (MACRO (LAZY))
  (MACWEISS (LAZY))
  (MAX ((NTH 2)
        DOTHESE !0 (IF (AND (INTEXP (## 2))
                            (INTEXP (## 3)))
                       ((1 IMAX))
                       NIL)
        (REMARK MIN/MAX)))
  (MEMBER ((IF (ATOMEXP (## 2))
               ((1 MEMB))
               NIL)
           (IF (VALUECONTEXT T)
               ((MBD (AND * T)))
               NIL)))
  (MEMQ ((1 MEMB)
         (IF (VALUECONTEXT T)
             ((MBD (AND * T)))
             NIL)))
  (MIN ((NTH 2)
        DOTHESE !0 (IF (AND (INTEXP (## 2))
                            (INTEXP (## 3)))
                       ((1 IMIN))
                       NIL)
        (REMARK MIN/MAX)))
  (MINUS (2 DOTHIS 0 (IF (INTEXP (## 2))
                         ((1 IMINUS))
                         NIL)))
  (MKATOM (LAZY))
  (NEQ (LAZY))
  (NUMBERP ((IF (VALUECONTEXT T)
                ((MBD (AND * T)))
                NIL)))
  (OPEN ((REMARK FILES)
         (IF (EQUAL (## 4)
                    (QUOTE (QUOTE OUTPUT)))
             ((1 OUTFILE))
             ((IF (EQUAL (## 4)
                         (QUOTE (QUOTE INPUT)))
                  ((1 INFILE))
                  (LAZY))))
         (3)
         (3)))
  (OPTIMIZE (LAZY))
  (OR ((IF (AND (VALUECONTEXT T)
                (NOT (TORNIL (## -1))))
           ((MBD (AND * T))
            2
            (NTH 2)
            DOTHESE)
           NIL)))
  (ORDERP (LAZY))
  (OTLL ((1 LINELENGTH)
         (REMARK FILES)))
  (OVOFF (LAZY))
  (OVON (LAZY))
  (PAIR (LAZY))
  (PAIRMAP (LAZY))
  (PLANT ((REMARK LAZY)))
  (PLANT1 ((REMARK LAZY)))
  (PLANTDC ((REMARK LAZY)))
  (PLANTSQ ((REMARK LAZY)))
  (PLUS ((NTH 2)
         DOTHESE !0 (IF (EVERY (## (NTH 2))
                               (FUNCTION INTEXP))
                        ((1 IPLUS))
                        NIL)))
  (PRBUFFER (LAZY))
  (PRINC ((1 PRIN1)))
  (PRINLAP (LAZY))
  (PROG ((E (AND REMOVEFNAMEFLG (MEMB (QUOTE FNAME)
                                      (## 2))
                 (## (I 2 (REMOVE (QUOTE FNAME)
                                  (## 2)))
                     (ORR (F (SETQ FNAME --)
                             DELETE)
                          NIL)))
            T)
         (NTH 3)
         DOTHESE))
  (PROG2 ((1 PROGN)))
  (PUTPROP ((1 PUT)
            (SW 3 4)))
  (QUOTE (NLAM))
  (QUOTIENT ((NTH 2)
             DOTHESE !0 (IF (AND (INTEXP (## 2))
                                 (INTEXP (## 3)))
                            ((1 IQUOTIENT))
                            NIL)))
  (RDS ((REMARK FILES)
        (1 INPUT)))
  (READCH ((IF (## 2)
               (LAZY)
               NIL)
           (REMARK FILES)
           (1 READC)))
  (RECIP ((1 FQUOTIENT 1)))
  (RELINK (LAZY))
  (REMAINDER ((NTH 2)
              DOTHESE !0 (IF (AND (INTEXP (## 2))
                                  (INTEXP (## 3)))
                             ((1 IREMAINDER))
                             NIL)))
  (REMFLAG (LAZY))
  (REMFLAGS (LAZY))
  (REMOB (LAZY))
  (REMPROP ((IF (VALUECONTEXT)
                ((NTH 2)
                 DOTHESE !0 (MBD PROG1 NIL))
                NIL)))
  (RESTORE (REM))
  (RETIME (LAZY))
  (RLIT (LAZY))
  (RNUMB (LAZY))
  (SASSOC ((IF (## 4)
               LAZY
               ((4)
                (IF (ATOMEXP (## 2))
                    ((1 ASSOC))
                    NIL)))))
  (SET (LAZY))
  (SETQ (3 DOTHIS))
  (SORT ((E (QUOTE (SORT is DESTRUCTIVE in INTERLISP - may need to 
                         recode)))
         TTY:))
  (SPEAK (LAZY))
  (SPECIAL (LAZY))
  (STOREATOM (LAZY))
  (STORECHAR (LAZY))
  (STOREEVAL (LAZY))
  (STORELIST (LAZY))
  (SUB1 (2 DOTHIS 0 (IF (INTEXP (## 2))
                        NIL
                        ((1 PLUS -1)))))
  (SUBLIS ((N T)))
  (SUBST15 ((1 SUBST)))
  (THOSE ((1 SUBSET)))
  (TIMES ((NTH 2)
          DOTHESE !0 (IF (EVERY (CDR (##))
                                (FUNCTION INTEXP))
                         ((1 ITIMES))
                         NIL)))
  (TIMETOT (LAZY))
  (TRACE (LAZY))
  (TTAB ((1 TAB)))
  (UNCOMMON ((1 UNSPECIAL)
             DOTHIS))
  (UNMACRO (LAZY))
  (UNSPECIAL (LAZY))
  (UNTRACE (LAZY))
  (VERBOS (LAZY))
  (WRS ((1 OUTPUT)))
  (XTAB ((1 SPACES)))
  (ZEROP (2 DOTHIS 0 (IF (SMALLEXP (## 2))
                         NIL
                         ((1 EQP 0)))))
  ({ (STOP))
  (} (LAZY))
))(QUOTE XFORM))

  (COND ((EQ (EVALV (QUOTE MERGE))
             T)
         (RPAQ TRANSFORMATIONS (UNION TRANSFORMATIONS
                                      (LISTP (GETP (QUOTE 
                                                    TRANSFORMATIONS)
                                                   (QUOTE VALUE)))))
         (MAPC (GETP (QUOTE USERNOTES)
                     (QUOTE VALUE))
               (FUNCTION (LAMBDA (NOTE)
                                 (OR (ASSOC (CAR NOTE)
                                            USERNOTES)
                                     (SETQ USERNOTES (CONS NOTE 
                                                          USERNOTES)))))
               ))
        (T (MAPC (GETP (QUOTE TRANSFORMATIONS)
                       (QUOTE VALUE))
                 (FUNCTION (LAMBDA (X)
                                   (AND (NOT (MEMB X TRANSFORMATONS))
                                        (/REMPROP X (QUOTE XFORM))))))))
  (ADDTOVAR USERMACROS
            (EXPANDMACS
              NIL
              (LPQ (ORF @ COMMENT ALIST OBLIST)
                   1
                   (IF (EQ (##)
                           (QUOTE @))
                       (UP (I 2 (@1 (## 2)))
                           (1))
                       ((IF (MEMB (##)
                                  (QUOTE (ALIST OBLIST)))
                            (LAZY)
                            ((REMFIX ?)))))))
            (NO NIL (REMARK LAZY)
                OK)
            (REMFIX (NOTE)
                    (E (OR (CDADR (ASSOC (QUOTE NOTE)
                                         USERNOTES))
                           (QUOTE (???? NOTE))))
                    TTY:)
            (LAZY NIL (REMFIX FIXIT))
            (REM NIL (-1 *))
            (LAZY NIL
                  (E (QUOTE (No transformation - fix this by hand!)))
                  TTY:))
  (ADDTOVAR EDITCOMSA LAZY REM LAZY NO EXPANDMACS)
  (ADDTOVAR EDITCOMSL REMFIX)
  (OR (GETD (QUOTE TRANSOR))
      (LOAD (OR (INFILEP (QUOTE <NEWLISP>TRANSOR.COM))
                (INFILEP (QUOTE <LISP>TRANSOR.COM)))))
(DEFLIST(QUOTE(
  (UREAD
    (NIL
      (BEFORE
        NIL
        (RETURN
          (PROG
            (X)
            LP
            (SELECTQ
              (CAR (SETQ X (NLSETQ (READ U))))
              ((EXITERR RESTORE OPEN CLOSE OPTIMIZE BPSMOVE FIXDEFINE)
               (RETURN (CONS (QUOTE COMMENT)
                             (CONS (CAR X)
                                   (READ U)))))
              (NIL
                (COND
                  ((NULL X)
                   (* END OF FILE)
                   (COND
                     ((EQ (CAR FILEVARS)
                          T)
                      (ERROR!))
                     (T
                       (RETURN
                         (PROG1
                           (CONS
                             (QUOTE PROGN)
                             (CONS
                               (LIST (QUOTE SETQ)
                                     FILEVARS
                                     (KWOTE (CAR FILEVARS)))
                               (CONS
                                 (LIST (QUOTE SETQ)
                                       FILEFNS
                                       (KWOTE (CAR FILEFNS)))
                                 (AND
                                   (CAR FILESPECVARS)
                                   (LIST (LIST (QUOTE SETQ)
                                               FILESPECVARS
                                               (KWOTE (CAR FILESPECVARS)
                                                      )))))))
                           (RPLACA FILEVARS T))))))
                  (T (GO LP))))
              (COMMENT (RETURN (CONS (CAR X)
                                     (READ U))))
              (PUTPROP (SET FILEVARS
                            (CONS (LIST (QUOTE PROP)
                                        (CADDR (SETQ X (READ U)))
                                        (CAR X))
                                  (CAR FILEVARS)))
                       (RETURN (CONS (QUOTE PUTPROP)
                                     (MAPCAR X (QUOTE KWOTE)))))
              (DEFINE (SETQ X (READ U))
                      (SET FILEFNS
                           (NCONC FILEFNS
                                  (MAPCAR (SETQ X (CAR X))
                                          (FUNCTION CAR))))
                      (RETURN (LIST (QUOTE DEFINE)
                                    (KWOTE X))))
              (CHKPOINT (HELP))
              (SPECIAL (SET FILESPECVARS (NCONC (CAR FILESPECVARS)
                                                (CAR (SETQ
                                                       X
                                                       (READ U)))))
                       (RETURN (CONS (QUOTE COMMENT)
                                     (CONS (QUOTE SPECIAL)
                                           X))))
              (HELP (QUOTE (WHAT TO DO WITH))
                    X))
            (GO LP))))))
  (TRANSOR
    (NIL
      (BEFORE
        NIL
        (PROGN
          (SETQ REMOVEFNAMEFLG (EQ (QUOTE Y)
                                   (Y/N Y "remove FNAME's?")))
          (SETQ INTEGERFLAG (SETQ SMALLINTEGERFLAG))
          (SELECTQ (Y/N ((N . o)
                         (Y . es)
                         (S . mall))
                        
            "Are all arithmatic expressions INTEGER expressions?  ")
                   (Y (SETQ INTEGERFLAG T))
                   (S (SETQ INTEGERFLAG (SETQ SMALLINTEGERFLAG T)))
                   NIL)
          (SETQ
            VALUECONTEXTFLG
            (EQ
              (Y/N
                N 

"Can one assume that the value of AND's, OR's, MEMBER's and the
like is not used (i.e. LISP 1.5 returns T while INTERLISP returns
different values? ")
              (QUOTE Y)))
          (SET (SETQ FILEVARS (FILEVARS SOURCEFILE)))
          (SET (SETQ FILEFNS (FILEFNS SOURCEFILE)))
          (SET (SETQ FILESPECVARS (PACK (LIST (NAMEFIELD SOURCEFILE)
                                              "SPECVARS"))))
          (BREAK0 (QUOTE UREAD)
                  T
                  (QUOTE (TRACE ?=
                                ((QUOTE (set up input file
                                             (i.e. do SFPTR if necc)
                                             and GO)))
                                UB)))))))
  (HELP-IN-TRANSITBLOCK ((TRANSITBLOCK . HELP)
                         (BEFORE NIL (ERROR!))))
))(QUOTE READVICE))

  (READVISE UREAD TRANSOR HELP-IN-TRANSITBLOCK)
STOP